﻿@model IEnumerable<b7.Models.Sanpham>

@{
    ViewBag.Title = "Dssanpham";
    Layout = "~/Views/Shared/_LayoutManager.cshtml";
}

<h2>Dssanpham</h2>
<p>@Html.ActionLink("Create New", "Create")</p>

<table>
    <tr>
        <th>
            Ảnh
        </th>
        <th>
            Tên sản phẩm
        </th>
        <th>
            OldPrice
        </th>
        <th>
            SalePrice
        </th>
        <th>
            Quantity
        </th>
        <th>
            NgayBatdau
        </th>
        <th>
            NgayKetThuc
        </th>
        <th>Action</th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
        <img src="../..@Html.DisplayFor(modelItem => item.Anh)" alt="Anh Quang Cao" height="60px" width="60px"/>
           
        </td>
        <td>
            
             @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.OldPrice)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.SalePrice)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Quantity)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.NgayBatdau)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.NgayKetThuc)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.SanphamId }) |
            @Html.ActionLink("Details", "Details", new { id = item.SanphamId }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.SanphamId })
        </td>
    </tr>
}

</table>
